<%@ page session="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%@ page isELIgnored="false" %>

<%@page import="java.util.Date;"%>

<html>
    <head><title>Hello :: Spring Application</title></head>
    <body>
        <h1>Hello2 - Spring Application</h1>
        
        <form action="addBook.htm">
            <input type="hidden" value="true" name="addBook"/>
            title: <input type="text" name="title"/><br>
            tags: <input type="text" name="tags"/><br>
            author: <select name="authorId">
                <c:forEach var="author" items="${authors}">
                    <option value="<c:out value="${author.id}"/>"><c:out value="${author}"/></option> 
                </c:forEach>
                
            </select>    
            <input type="submit" value="dodaj"/>	
        </form>
        
        <div><c:if test="${err != null}">
                <c:out value="${err}" />
        </c:if></div>
    </body>
</html>